<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>    
<!DOCTYPE>
<html>
	<head>
		<meta charset="UTF-8">
		<title>订单详情</title>
		
		<!--引入jquery-->
		<script src="${pageContext.request.contextPath}/js/jquery-3.3.1.js" type="text/javascript" charset="utf-8"></script>
		<!--引入bootsrap-->
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/bootstrap.css"/>
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/bootstrap-theme.css"/>
		<script src="${pageContext.request.contextPath}/js/bootstrap.js" type="text/javascript" charset="utf-8"></script>
		<script src="${pageContext.request.contextPath}/js/npm.js" type="text/javascript" charset="utf-8"></script>
		
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/user/cart.css"/>
	
	</head>
	<body>
		
		<!--导航条-->
		<jsp:include page="/user/header.jsp"></jsp:include>
		
		<!--订单详情-->
		<div class="container">
			
			<div class="box-header with-border">
	            <h3 class="box-title">订单详情</h3>
	        </div>
			
			<table class="table table-bordered table-hover table-striped">
				
				<tr>
					<th class="text-center">商品</th>
					<th class="text-center">名称</th>
					<th class="text-center">价格</th>
					<th class="text-center">数量</th>
					<th class="text-center">小计</th>
					<th class="text-center">操作</th>
				</tr>
				
				<c:forEach var="carItem" items="${car.carItems }">
					<tr class="text-center">
						<td class="item">
							<img src="/img/${carItem.product.pImg }"/>
						</td>
						<td class="item">${carItem.product.pname }</td>
						<td class="item">${carItem.product.shellPrice }</td>
						<td class="item"><input type="text" value="${carItem.count }" /></td>
						<td class="item">${carItem.totalPrice }</td>
						<td class="item">
							<a href="${pageContext.request.contextPath }/CarServlet?action=removeCar&pid=${carItem.product.pid }">删除</a>
						</td>
					</tr>
				</c:forEach>
				
				
				
			</table>
			
		</div>
			
		<!--foot-->				
		<jsp:include page="/user/footer.jsp"></jsp:include>
			
			
	</body>
</html>
